<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #box{
      width: 300px;
      height: 100px;
      background-color: cyan;
      transform: skew(-45deg);
      margin-left: 200px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    #box>h1{
      transform: skew(45deg);
    }

    .box{
      width: 300px;
      height: 100px;
      position: relative;
      /* display: flex;
      align-items: center;
      justify-content: center; */
    }
    .box::before{
      content: '';
      position: absolute;
      top: 0;right: 0;bottom: 0;left: 0;
      /* margin: auto; */
      background: pink;
      z-index: -1;
      transform: skew(-45deg);
    }
  </style>
</head>
<body>
    <div id="box">
      <h1>this is skew content</h1>
    </div>

    <div class="box">
      <h1>this is skew content methods </h1>
    </div>
</body>
</html>